﻿@{
    ViewBag.Title = "AddForm";
    Layout = "~/Views/Shared/_FlowForm.cshtml";
}
<script>

    var keyValue = request('keyValue');
    $(function () {
        if ((!!keyValue)) {
            $.SetForm({
                url: "../../QualificationManage/FirstTrial/GetMaterialRuleEntity",
                param: { keyValue: keyValue },
                success: function (data) {
                    $("#form1").SetWebControls(data);
                }
            })
        }
        $("#IsUpload").click(function () { 
            $("#IsSubmit").attr("checked", true);
        })
    })

    //保存
    function AcceptClick() {

        if (!$('#form1').Validform()) {
            return false;
        }
        var postData = $("#form1").GetWebControls(keyValue);
        $.SaveForm({
            url: "../../QualificationManage/FirstTrial/SaveMaterialRuleEntity?keyValue=" + keyValue,
            param: postData,
            loading: "正在保存数据...",
            success: function (iframeId) {
                top.frames["MSettingForm"].$("#gridTable2").trigger("reloadGrid");
                dialogClose();
            }
        }) 
    }
</script>
<div id="BaseInfo" class="tab-pane active" style=" padding-right: 30px;">
    <table class="form">
        <tr>
            <td class="formTitle">资料名称<font face="宋体">*</font></td>
            <td class="formValue">
                <input id="Name" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />
            </td>

        </tr>
        <tr>
            <td class="formTitle">排序<font face="宋体">*</font></td>
            <td class="formValue">
                <input id="Sort" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" />

            </td>

        </tr>
        <tr>
            <td class="formTitle">选项</td>
            <td class="formValue">
                <input type="checkbox" name="IsSubmit" id="IsSubmit"  value="1">提交
                <input type="checkbox" name="IsUpload" id="IsUpload" value="1">上传
                <input type="checkbox" name="EnabledMark" id="EnabledMark" value="1">有效
                <input type="checkbox" name="DeleteMark" id="DeleteMark" value="1">可删除
            </td>
        </tr>

        <tr>
            <th class="formTitle" valign="top" style="padding-top: 4px;">
                资料说明
            </th>
            <td class="formValue">
                <textarea id="Description" class="form-control" style="height: 50px;" isvalid="yes" checkexpession="IsScript"></textarea>
            </td>
        </tr>


        <tr>
            <th class="formTitle" valign="top" style="padding-top: 4px;">
                备注
            </th>
            <td class="formValue">
                <textarea id="Memo" class="form-control" style="height: 50px;" isvalid="yes" checkexpession="IsScript"></textarea>
            </td>
        </tr>
    </table>
</div>
